package me.yricky.alia.ui

import androidx.compose.material.MaterialTheme
import androidx.compose.runtime.Composable
import androidx.compose.runtime.collectAsState
import androidx.compose.runtime.getValue
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.painter.Painter
import androidx.compose.ui.res.painterResource
import kotlinx.coroutines.flow.MutableStateFlow

/**
 * @author Yricky
 * @date 2022/1/29
 */

val themeColor = MutableStateFlow(Color(0xffee3377))


@Composable
fun AliaTheme(content:@Composable ()->Unit){
    val color by themeColor.collectAsState()
    MaterialTheme(
        colors = MaterialTheme.colors.copy(
            primary = color,
            secondary = color,
        )
    ) {
        content()
    }
}

object AliaIcons{

    @Composable
    fun defaultWindowIcon(): Painter = painterResource("icons/defaultWindowIcon.jpg")
}